	<h2>Store: Add store</h2>
	<div class="error"></div><?php echo validation_errors(); ?></div>
	<form id="storeForm" action="<?=site_url(array("c" => "cms_store", "m" => "add_store"))?>" method="post">
		<table border="0" cellspacing="5" cellpadding="0" class="form-table" width="1000">
			<tr>
				<th>Title: </th>
				<td><input type="text" name="item_title" class="input-text required" value=""></td>
			</tr>
			<tr>
				<th>Store Name: </th>
				<td><input type="text" name="item_company_name" class="input-text required" value=""></td>
			</tr>
			<tr>
				<th>Image: </th>
				<td>
					<input type="text" id="item_image" name="item_image" value="">
					<input id="item_image_btn" name="item_image_btn" type="button" class="ins" value="..." />
				</td>
			</tr>			
			<tr>
				<th>Gallery: </th>
				<td>
					<select name="item_gallery_id" class="input-select">
						<option value="">Please select</option>
						<?php foreach($galleries as $item):?>
						<option value="<?=$item['id']?>">
							<?=$item['title']?>
						</option>
						<?php endforeach;?>
					</select>
				</td>
			</tr>
			<tr>
				<th>Website: </th>
				<td><input type="text" name="item_website" class="input-text required website" value=""></td>
			</tr>
			<tr>
				<th>Email: </th>
				<td><input type="text" name="item_email" class="input-text required email" value=""></td>
			</tr>
			<tr>
				<th>Zipcode: </th>
				<td><input type="text" name="item_zipcode" class="input-text required number" value=""></td>
			</tr>
			<tr>
				<th>Phone: </th>
				<td><input type="text" name="item_home_phone" class="input-text" value=""></td>
			</tr>
			<tr>
				<th>City: </th>
				<td><input type="text" name="item_city" class="input-text" value=""></td>
			</tr>
			<tr>
				<th>State: </th>
				<td><input type="text" name="item_state" class="input-text" value=""></td>
			</tr>
			<tr>
				<th>Address: </th>
				<td><input type="text" name="item_address" class="input-text" value=""></td>
			</tr>
			<tr>
				<th>Is Special: </th>
				<td>
					Yes <input type="radio" name="item_is_special" class="" value="yes"/>
					No <input type="radio" name="item_is_special" class="" checked="true" value="no"/>
				</td>
			</tr>
			<tr>
				<th>Types: </th>
				<td>
					<select name="item_types[]" class="input-select" multiple="true" size="4">
						<option value="">Please select</option>
						<?php foreach($types as $type):?>
						<option value="<?=$type['id']?>">
							<?=$type['title']?>
						</option>
						<?php endforeach;?>
					</select>
				</td>
			</tr>
			<tr>
				<th>Business hour: </th>
				<td>
					<?=$this->ckeditor->editor("item_business_hour", '', array("baseHref" => site_url()));?>
				</td>
			</tr>
			<tr>
				<th>Description: </th>
				<td>
					<?=$this->ckeditor->editor("item_desc", '', array("baseHref" => site_url()));?>
				</td>
			</tr>
			<tr>
				<th>Coupons: </th>
				<td>
					<?=$this->ckeditor->editor("item_coupon", '', array("baseHref" => site_url()));?>
				</td>
			</tr>
			<tr>
				<th>Menu: </th>
				<td>
					<?=$this->ckeditor->editor("item_menu", '', array("baseHref" => site_url()));?>
				</td>
			</tr>
			<tr>
				<th>&nbsp;</th>
				<td>
					<input type="button" class="ins" onClick="javascript:history.back();" value="Cancel" />
					<input name="Submit" type="submit" class="ins" value="Save" />
				</td>
			</tr>
		</table>
	</form>
<script type="text/javascript">
	var finder = new CKFinder();
	finder.BasePath = '/system/plugins/ckfinder/';
	finder.SelectFunction = SetFileFieldNewImg;
	$("#item_image_btn").bind("click", function(){
		finder.Popup();
	});
	function SetFileFieldNewImg(fileUrl) {
		$('#item_image').val(fileUrl);
	}
</script>